#ifndef __USER_SID34_SERVICE_H__
#define __USER_SID34_SERVICE_H__

#include <stdint.h>

#define DATA_FORMATLDENTIFIER        0x00
#define REQUEST_DOWNLOAD_MESSAGE_LEN 0x0B
#define MEM_ADD_AND_SIZE_FORMAT      0x44
#define LEN_FORMAT                   0x20
#define REQUEST_DOWNLOAD_RESP_LEN    0x04

#pragma pack(1)
typedef struct
{
    uint8_t  sid;
    uint8_t  data_format;             /*default:0x00(数据格式标识符)*/
    uint8_t  mem_add_and_size_format; /*default:0x44*/
    uint32_t mem_add;
    uint32_t mem_size;
} req_download_req_struct;
#pragma pack()

#pragma pack(1)
typedef struct
{
    uint8_t positive_resp_id;
    uint8_t
        len_format; // lengthFormatIdentifier长度格式标识符(低四位：文件保留，设置为0;高四位：最大信息组长度参数的长度)
    uint16_t data_len_max; // maxNumberOfBlockLength最大信息组长度
} req_download_positive_resp_struct;
#pragma pack()

int16_t Request_Download_Port(uint8_t *rec_buf, uint8_t *rsp_buf, uint16_t rec_len);

#endif